// 路由入口
import VueRouter from 'vue-router'
// 导入对应的路由组件
import HomeContainer from './components/tabbar/HomeContainer.vue'
import UserContainer from './components/tabbar/UserContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import NewsList from './components/news/newsList.vue'
import NewsInfo from './components/news/Newsinfo.vue'
var router = new VueRouter({
    // 配置路由规则
    routes : [
        {
            path: '/',
            redirect : '/home'
        },
        {
            path: '/home',
            component : HomeContainer
        },
        {
            path: '/user',
            component: UserContainer
        },
        {
            path: '/shopcar',
            component: ShopcarContainer
        },
        {
            path: '/search',
            component: SearchContainer
        },
        {
            path: '/home/newslist',
            component : NewsList
        },
        {
            path: '/home/newsinfo/:id',
            component : NewsInfo
        }
    ],
    // 覆盖默认路由高亮的类
    linkActiveClass: 'mui-active'
})
export default router